/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sip;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.Timer;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.util.Date;

/**
 *
 * @author arianareyessantiago
 */
public class InsulinLabel extends JTextField implements ActionListener{
    
    public InsulinLabel(){
        super("" + new Date());
        Timer t = new Timer(1000, this);
        t.start();
    } 
    
      public void actionPerformed(ActionEvent ae) {
          setText(Double.toString(InitSip.totalInsulinAmount));
          
      }
    
}
